<?php

class Zend_View_Helper_GetUser extends Zend_Controller_Action_Helper_Abstract {

    /**
     * @var Zend_View_Interface 
     */
    public $view;

    public function getUser($userId, $row = null) {
        $userModel = new User_Model_Accounts();
        $user = $userModel->fetchRow('id=' . $userId)->toArray();
        if (!$row)
            return $user;
        return $user[$row];
    }

    /**
     * Sets the view field 
     * @param $view Zend_View_Interface
     */
    public function setView(Zend_View_Interface $view) {
        $this->view = $view;
    }

}